#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "pointstream.h"
#include "plotarea.h"
#include "clinethread.h"
//#define USE_TIMER
namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
signals:
    void updatePlot();
private:
    Ui::MainWindow *ui;
    static const int SAMPLE_GENERATION_PERIOD = 5; // 采样周期 5 ms
    quint64 sampleNumber = 0;

    QList <PointStream *> *streamList;

    PlotArea *plotArea;
    CLineThread *thread;
    void timerEvent(QTimerEvent *event);
public slots:
    void update();

};

#endif // MAINWINDOW_H
